<?php
namespace yan\hkecship\utils;
class BinBox{
	/**
	 * mm
	 * g
	 * */
	public $width;
	public $height = 900; //假設
	public $depth = 1500;
	public $weight = 30000; // <10 – 30公斤
	public $items = []; //已添加的箱子
	public $free = []; //剩餘空間
	public function __construct(){
		$this->width = $this->getWidth();
	}
	/**
	 * 周長 + 長度 : 3米(XP)
	 * 長度 : 1.5米 (XP)
	 * */
	public function getWidth(){
		return 1500/2 - $this->height;
	}
	public function addItem(Item $item){
		if($this->canAdd($item)){
			$this->items[] = $item;
			return true;
		}
		return false;
	}
	public function canAdd(Item $item){

	}
}
class Item{
	public $width;
	public $height;
	public $depth;
	public $weight;
	public function __construct($width, $height, $depth, $weight){
		$this->width = $width;
		$this->height = $height;
		$this->depth = $depth;
		$this->weight = $weight;
	}
}